﻿using System.ServiceModel;

namespace RemoteWorker.Worker
{
	public class WorkerServerConnection : DuplexClientBase<IWorkerServer>, IWorkerServer
	{
		public WorkerServerConnection(IWorker callbackInstance) : base(callbackInstance)
		{
			callbackInstance.SetServer(this);
		}

		public void Ping(string name)
		{
			Channel.Ping(name);
		}

		public void SendOutput(string data)
		{
			Channel.SendOutput(data);
		}

		public void Disconnect(string name)
		{
			Channel.Disconnect(name);
		}

        public void Complite(int exitCode)
		{
			Channel.Complite(exitCode);
		}
	}
}